import React from 'react';
import {Text, View, TouchableWithoutFeedback} from 'react-native';
import PropTypes from 'prop-types';

export default function EmptyView(props) {
    return <TouchableWithoutFeedback onPress={props.onPress}>
        <View style={{
        justifyContent: "center",
        alignItems: "center",
        flexDirection: "row",
        flex: 1,
        alignSelf:'stretch',
        ...props.style
    }}>
        <Text style={props.emptyTextStyle}>{props.emptyText}</Text>
    </View></TouchableWithoutFeedback>;
}

EmptyView.propTypes = {
    emptyText: PropTypes.string,
    emptyTextStyle: PropTypes.object,
    onPress: PropTypes.func
};

EmptyView.defaultProps = {
    emptyText: '无数据',
    emptyTextStyle: {
        fontWeight: "400",
        fontSize: 14,
        color: "#666666"
    }
};
